using System;
using System.Collections.Generic;
using System.Text;

using NUnit.Framework;
using Rhino.Mocks;

using MCromwell.StaffIntranet.Core;
using MCromwell.StaffIntranet.DTO;
using MCromwell.StaffIntranet.DependencyInjection;
using MCromwell.StaffIntranet.Task.Infrastructure.Logging;
using MCromwell.StaffIntranet.Data.NHibernate;

using MCromwell.BDD;
using MCromwell.StaffIntranet.Task.Tasks;
using MCromwell.StaffIntranet.Presenters;
using MCromwell.StaffIntranet.Task;

namespace MCromwell.StaffIntranet.DependencyInjection.Test
{
    [TestFixture]
    [Category("Presenter Layer Integration")]
    public class When_resolving_presenter_layer_dependencies : Specification
    {
        [Test]
        public void Should_returned_correct_tasks_when_asked_to_resolve()
        {
            Assert.IsInstanceOfType(typeof(StaffManagementTask), IoC.Resolve<IStaffManagementTask>(), "staff management task");
            Assert.IsInstanceOfType(typeof(StaffViewingTask), IoC.Resolve<IStaffViewingTask>(), "staff viewing task");
            Assert.IsInstanceOfType(typeof(CommonTask), IoC.Resolve<ICommonTask>(), "common task");
            Assert.IsInstanceOfType(typeof(AuthenticationTask), IoC.Resolve<IAuthenticationTask>(), "auth task");
        }
                
        public override void Before_each_spec()
        {
            
        }

        [TestFixtureSetUp]
        public void TextFixtureSetup()
        {
            IoC.InitializeWith(new ServiceResolver());
            TaskLayerBootStrapper.ConfigureDependencies();
            PresenterLayerBootStrapper.ConfigureDependencies();
        }
       
    }
               
}
